// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import 'normalize.css';
import 'lib-flexible';
import 'animate.css';
import 'border.css';
import Swiper from 'swiper';
import Vue from 'vue';
// import Vuex from 'vuex';
import BScroll from 'better-scroll';
import lazyload from 'vue-lazyload';
import 'swiper/dist/css/swiper.min.css';
import router from './router';
import bottom from './publicComponents/bottom/index';
import api from './http/api';
import eventBus from './eventBus';
import popUp from './publicComponents/popUp';
import headers from './publicComponents/headers';
import { BetterScroll } from './publicComponents/better-scroll/index';
import { store } from './vuex';
import './directives/hintText';
/* eslint-disable*/
Vue.use(lazyload, {
  error: require('./assets/mall/error.jpg'),
  loading: require('./assets/mall/lazy.gif'),
});
Vue.use(bottom);
Vue.use(popUp);
Vue.use(headers);
Vue.use(BetterScroll);
Vue.prototype.$Swiper = Swiper;
Vue.config.productionTip = false;
Vue.prototype.$api = api;
Vue.prototype.$bus = eventBus;
Vue.prototype.$Bs = BScroll;
// 实例化store对象之前需要调用 Vue.use(Vuex);
// mapState
// const store = new Vuex.Store({
//   state: { // 数据仓库
//     person: {
//       name: 'lww',
//       age: 30,
//     },
//     count: 0
//   }
// });
/* eslint-disable no-new */
new Vue({ router, store }).$mount('#app');
